package com.ujs.shc.service.impl;

import com.ujs.shc.dao.FocusMapper;
import com.ujs.shc.pojo.Focus;
import com.ujs.shc.service.FocusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FocusServiceImpl implements FocusService {

    @Autowired
    private FocusMapper focusMapper;

    @Override
    public Focus getFocusByGidAndUid(Integer goodsId, Integer userId) {

        return focusMapper.selectFocusByGidAndUid(goodsId, userId);
    }

    @Override
    public Integer addFocus(Integer goodsId, Integer userId) {

        return focusMapper.insertFocus(goodsId, userId);
    }

    @Override
    public Integer removeFocus(Integer goodsId, Integer userId) {
        return focusMapper.deleteFocus(goodsId, userId);
    }
}
